package cn.edu.scau.cmi.luodongmei.simpleFactory;

import cn.edu.scau.cmi.luodongmei.domain.DamageInsurance;
import cn.edu.scau.cmi.luodongmei.domain.DeathInsurance;
import cn.edu.scau.cmi.luodongmei.domain.InjuryInsurance;
import cn.edu.scau.cmi.luodongmei.domain.Insurance;
import cn.edu.scau.cmi.luodongmei.domain.MultiAccidentInsurance;

public class InsuranceFactorys {
	public static Insurance createInsurance(int select) {
		Insurance insurance = null;
		switch(select) {
		case 0:
			insurance = new InjuryInsurance();
			break;
		case 1:
			insurance = new DamageInsurance();
			break;
		case 2:
			insurance = new DeathInsurance();
			break;
		case 3:
			insurance = new MultiAccidentInsurance();
			break;
		default:
		}
		return insurance;
	}
}
